<table>
  <tr>
    <th>Name</th>
    <th>Company</th>
    <th>Purchase date</th>
    <th>Purchase cost</th>
    <th>Purchase Quantity</th>
    <th>Sale cost</th>
    <th>Available Quantity</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @stocks.each do |stock| %>
  <tr>
    <td><%= stock.name %></td>
    <td><%= stock.company %></td>
    <td><%= stock.purchase_date %></td>
    <td><%= stock.purchase_cost %></td>
    <td><%= stock.purchase_quantity %></td>
    <td><%= stock.sale_cost %></td>
    <td><%= stock.quantity %></td>
    <td><%= link_to 'Show', stock %></td>
    <td><%= link_to 'Edit', edit_stock_path(stock) %></td>
    <td><%= link_to 'Destroy', stock, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Stock', new_stock_path %>
